<?php
/**
 * Create By: PhpStorm
 * User: yihua
 * File: GetBannerList.php
 * Date: 2017/2/16
 * Time: 1:19
 */

namespace app\home\model\page\shop;

use app\api\model\dao\BannerImage;
use app\library\Error;
use app\library\PageBase;
use think\Cache;

class GetBannerImageList extends PageBase
{

    private $objBannerImage;

    public function __construct()
    {
        parent::__construct();

        $this->objBannerImage = new BannerImage();
    }

    public function excute($param)
    {
        $ret = $this->checkToken($param);
        if (false === $ret) {
            return $this->getRes(Error::ERR_NO_AUTH);
        }
        // TODO:业务逻辑
        $ret = $this->objBannerImage->getBannerImageList();
        if (false === $ret) {
            return $this->getRes(Error::ERR_SYS);
        }

        $this->data = $ret;
        return $this->getRes();
    }
}
